package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.EmpContactsAddDTO;
import org.jsola.hr.dto.EmpContactsUpdateDTO;
import org.jsola.hr.query.EmpContactsQuery;
import org.jsola.hr.vo.EmpContactsListVO;
import org.jsola.hr.vo.EmpContactsVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-员工联系人")
public interface IEmpContactsControllerAPI {

    /**
     * 新增员工联系人
     * @param empContactsAddDTO 员工联系人新增实体
     * @return 员工联系人展示对象
     */
    @ApiOperation(value = "新增员工联系人")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empContactsAddDTO", dataType = "EmpContactsAddDTO", value = "新增员工联系人", paramType = "body")
    })
    Result<EmpContactsVO> save(EmpContactsAddDTO empContactsAddDTO);


    /**
     * 修改员工联系人
     * @param empContactsUpdateDTO 员工联系人
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工联系人")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empContactsUpdateDTO", dataType = "EmpContactsUpdateDTO", value = "修改员工联系人", paramType = "body")
    })
    Result<Integer> update(EmpContactsUpdateDTO empContactsUpdateDTO);




    /**
     * 删除单个员工联系人，彻底删除
     * @param empContactsId 员工联系人id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个员工联系人，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empContactsId", dataType = "String", value = "员工联系人id", paramType = "path")
    })
    Result<Integer> delete(String empContactsId);


    /**
     * 批量删除员工联系人，彻底删除
     * @param empContactsIds 员工联系人id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除员工联系人，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empContactsIds", dataType = "String[]", value = "员工联系人id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] empContactsIds);


    /**
     * 根据员工联系人id查询员工联系人详情
     * @param empContactsId 员工联系人id
     * @return 员工联系人详情
     */
    @ApiOperation(value="根据员工联系人id查询员工联系人详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empContactsId", dataType = "String", value = "员工联系人id", paramType = "path")
    })
    Result<EmpContactsVO> findById(String empContactsId);


    /**
     * 查询员工联系人
     * @param empContactsQuery 员工联系人查询参数
     * @return page
     */
    @ApiOperation(value="查询员工联系人")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empContactsQuery", dataType = "EmpContactsQuery", value = "员工联系人查询参数", paramType = "query")
    })
    Result<List<EmpContactsListVO>> listAll(EmpContactsQuery empContactsQuery);


     /**
     * 分页查询员工联系人
     * @param empContactsQuery 员工联系人查询参数
     * @return page
     */
    @ApiOperation(value="分页查询员工联系人")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empContactsQuery", dataType = "EmpContactsQuery", value = "员工联系人查询参数", paramType = "query")
    })
    Result<Page<EmpContactsListVO>> page(EmpContactsQuery empContactsQuery);

    /**
     * 删除员工联系人
     * @param empContactsId 员工联系人id
     * @return 删除数量
     */
    @ApiOperation(value="删除员工联系人")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empContactsId", dataType = "String", value = "员工联系人id", paramType = "path")
    })
    Result<Integer> deleteEmpContacts(String empContactsId);


}

